package base.service.impl;

import base.bean.RoomEntity;
import base.dao.IRoomDao;
import base.service.IRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by uas on 2018/3/18.
 */
@Service
@Transactional
public class IRoomServiceimpl implements IRoomService {
    @Autowired
    public IRoomDao iRoomDao;
    String sql;

    @Override
    public void updateNameById(int cips, int id) {
        iRoomDao.updateNameById(cips,id);
    }

    @Override
    public List<RoomEntity> findByaEquals() {
        return iRoomDao.findByaEquals();
    }

    @Override
    public List<RoomEntity> findCipsAndRoomtype(String roomytpe) {
        return iRoomDao.findCipsAndRoomtype(roomytpe);
    }

    @Override
    public RoomEntity findOne(int id) {
         return iRoomDao.findOne(id);
    }

    @Override
    public RoomEntity save(RoomEntity saveRoom) {
        return iRoomDao.save(saveRoom);
    }

    @Override
    public List<RoomEntity> findAll() {
        return iRoomDao.findAll();
    }

}
